﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nage.Algorithms.Solution;
using Nage.Algorithms.Population;

namespace Nage.Algorithms.Evolution
{    
    /// <summary>
    /// Solution recombination interface. When implemented, defines how
    /// each solution should recombine in time.
    /// </summary>
    /// <typeparam name="TSol">Type of the solution</typeparam>
    public interface ISolutionRecombination<TSol> where TSol : ISolution
    {
        /// <summary>
        /// Recombines two parents into one child (2x1 recombination).
        /// Note that method should not affect neither of the parents
        /// </summary>
        /// <param name="solutionA">Parent A solution</param>
        /// <param name="solutionB">Parent B solution</param>
        /// <returns>Child solution array recombined from parents</returns>
        TSol[] Recombine(TSol solutionA, TSol solutionB);
    }
}
